package com.itheima.reggie.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.itheima.reggie.common.LocalDateTimeConverter;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class CommonEntity {
    @TableField(fill = FieldFill.INSERT)
    @ExcelProperty(value = "创建时间",converter = LocalDateTimeConverter.class)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty(value ="更新时间",converter = LocalDateTimeConverter.class)
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT)
    @ExcelProperty("创建者")
    private Long createUser;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty("更新者")
    private Long updateUser;
}
